package com.hulk.dryad.admin.controller.monitor;

import com.hulk.dryad.admin.service.RedisMonitorService;
import com.hulk.dryad.common.component.R;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author kim
 * @date 2019-05-08
 * <p>
 * redis 数据
 */
@Api(value = "redis", tags = "REDIS监控模块")
@RestController
@RequiredArgsConstructor
@RequestMapping("/monitor/redis")
public class RedisMonitorController {

	private final RedisMonitorService redisMonitorService;

	/**
	 * 查询redis信息
	 * @return
	 */
	@ApiOperation(value = "info", notes = "redis监控详细信息")
	@GetMapping("/info")
	public R getInfo() {
		return R.ok(redisMonitorService.getInfo());
	}

}
